package com.bjpowernode.springboot.web;

import com.bjpowernode.springboot.domain.Photo;
import com.bjpowernode.springboot.domain.Temperature;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/photo")
public class PhotoController {
    @ApiOperation(value = "查询图片")
    @GetMapping("/query")
    public Photo query(@RequestParam String name){
        Photo p1=new Photo("zz","123");
        Photo p2=new Photo("jj","456");
        Map<String,Photo> map1=new HashMap<>();

        map1.put("zz",p1);
        map1.put("jj",p2);
        Photo p3=map1.get(name);
        return p3;
    }

}
